package cn.stacey.day11;

import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;

import org.junit.Test;


public class DemoWriter {
	@Test
	public void test() {
		try(OutputStreamWriter os=new OutputStreamWriter(new FileOutputStream("yuan.txt"),"utf-8");){
			
			os.write("袁诗哈哈哈哈");
			
		}catch(IOException e) {
			e.printStackTrace();
		}
		
	}
	@Test
	public void test1() {
		try(FileOutputStream os=new FileOutputStream("yuan1.txt");){
			
			os.write('A');
			
		}catch(IOException e) {
			e.printStackTrace();
		}
		
	}
}
